<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>

    <div class="form-div">
        <form action="getData" role="form">
            <div class="form-group">
                <label>Province/State：</label>
                <select class="form-control" name="province">
                    <option value="-1"
                            th:selected="${modelParams.province.equals('-1')}">--请选择--</option>
                    <option th:each="pro: ${modelParams.provinces}"
                            th:text="${pro}"
                            th:selected="${pro==modelParams.province}">
                    </option>
                </select>

                <label>Country/Region：</label>
                <select class="form-control" name="region">
                    <option value="-1"
                            th:selected="${modelParams.region.equals('-1')}">--请选择--</option>
                    <option th:each="coun: ${modelParams.countries}"
                            th:text="${coun}"
                            th:selected="${coun==modelParams.region}"
                            >
                    </option>
                </select>
                <button type="submit" class="btn btn-success" >查询</button>
            </div>
        </form>
    </div>
    <hr/>
    <table class="table table-striped" style="width: 600px;">
        <thead>
        <tr>
            <th>number</th>
            <th>Province/State</th>
            <th>Country/Region</th>
            <th>latestTotalCases</th>
            <th>diffFromPreDay</th>
        </tr>
        </thead>
        <tbody>
        <tr th:each="confirm,confirmStat: ${modelParams.confirms}" >
            <td th:text="${confirmStat.count}"></td>
            <td th:text="${confirm.state}"></td>
            <td th:text="${confirm.country}"></td>
            <td th:text="${confirm.latestTotalCases}"></td>
            <td th:text="${confirm.diffFromPreDay}"></td>
        </tr>

        </tbody>
    </table>
    <style>
        .form-div{
            width: 500px;
            padding: 10px;
        }
        .form-control {
            margin-bottom: 10px;
        }
    </style>
</body>
</html>